Section 3.6.7.17
Radial


The radial pattern.

The radial pattern is a radial blend that wraps around the +Y axis. The color for value 0.0 starts at the +X direction and wraps the color map around from east to west with 0.25 in the -Z direction, 0.5 in -X, 0.75 at +Z and back to 1.0 at +X. Typically the pattern is used with a frequency modifier to create multiple bands that radiate from the Y axis.

The pattern uses the ramp_wave wave type by default but may use any wave type. The pattern may be used with color_map, pigment_map, normal_map, slope_map and texture_map.


Section 3.6.7.18
Ripples


The ripples pattern.

The ripples pattern was originally designed only to be used as a normal pattern. It makes the surface look like ripples of water. The ripples radiate from 10 random locations inside the unit cube area <0,0,0> to <1,1,1>. Scale the pattern to make the centers closer or farther apart.

Usually the ripples from any given center are about 1 unit apart. The frequency keyword changes the spacing between ripples. The phase keyword can be used to move the ripples outwards for realistic animation.

The number of ripple centers can be changed with the global parameter global_setting {number_of_waves FLOAT} somewhere in the scene. This affects the entire scene. You cannot change the number of wave centers on individual patterns. See "global_settings" for details.

When used as a normal pattern, ripples uses a specialized normal perturbation function. This means that the ripples pattern cannot be used with normal_map, slope_map, or wave type modifiers in a normal statement.

When used in pigment or texture statements the ripples pattern uses the ramp_wave wave type by default but may use any wave type. The pattern may be used with color_map, pigment_map, and texture_map.


Section 3.6.7.19
Spiral1


The spiral1 pattern.

The spiral1 pattern creates a spiral that winds around the y-axis similar to a screw. Its syntax is:

pigment { spiral1 NUMBER_OF_ARMS }

The NUMBER_OF_ARMS-value determins how may "arms" are winding around the y axis.

The pattern uses the triangle_wave wave type by default but may use any wave type. The pattern may be used with color_map, pigment_map, normal_map, slope_map and texture_map.


Section 3.6.7.20
Spiral2


The spiral2 pattern.

The spiral2 pattern is a modification of the spiral2 pattern with an extraordinary look.

The pattern uses the triangle_wave wave type by default but may use any wave type. The pattern may be used with color_map, pigment_map, normal_map, slope_map and texture_map.


Section 3.6.7.21
Spotted


The spotted pattern.

The spotted pattern is identical to the bozo pattern. Early versions of POV-Ray did not allow turbulence to be used with spotted. Now that any pattern can use turbulence there is no difference between bozo and spotted. See "bozo" for details.


Section 3.6.7.22
Waves


The waves pattern.

The waves pattern was originally designed only to be used as a normal pattern. The waves pattern looks similar to the ripples pattern except the features are rounder and broader. The effect is to make waves that look more like deep ocean waves. The waves radiate from 10 random locations inside the unit cube area <0,0,0> to <1,1,1>. Scale the pattern to make the centers closer or farther apart.

Usually the waves from any given center are about 1 unit apart. The frequency keyword changes the spacing between waves. The phase keyword can be used to move the waves outwards for realistic animation.

The number of ripple centers can be changed with the global parameter global_setting {number_of_waves FLOAT} somewhere in the scene. This affects the entire scene. You cannot change the number of wave centers on individual patterns. See "global_settings" for details.

When used as a normal pattern, waves uses a specialized normal perturbation function. This means that the waves pattern cannot be used with normal_map, slope_map, or wave type modifiers in a normal statement.

When used in pigment or texture statements the waves pattern uses the ramp_wave wave type by default but may use any wave type. The pattern may be used with color_map, pigment_map, and texture_map.


Section 3.6.7.23
Wood


The wood pattern.

The wood pattern consists of concentric cylinders centered on the Z axis. When appropriately colored, the bands look like the growth rings and veins in real wood. Small amounts of turbulence should be added to make it look more realistic. By default, wood has no turbulence.

Unlike most patterns, the wood pattern uses the triangle_wave wave type by default. This means that like marble, wood uses color map values 0.0 to 1.0 then repeats the colors in reverse order from 1.0 to 0.0. However you may use any wave type. The pattern may be used with color_map, pigment_map, normal_map, slope_map and texture_map.


Section 3.6.7.24
Wrinkles


The wrinkles pattern.

The wrinkles pattern was originally designed only to be used as a normal pattern. It uses a 1/f noise pattern similar to granite but the features in wrinkles are sharper. The pattern can be used to simulate wrinkled cellophane or foil. It also makes an excellent stucco texture.

When used as a normal pattern it uses a specialized normal perturbation function. This means that the wrinkles pattern cannot be used with normal_map, slope_map, or wave type modifiers in a normal statement.

When used as a pigment pattern or texture pattern, the wrinkles pattern is similar to normal wrinkles but is not identical as are most normals when compared to pigments. When used in pigment or texture statements the wrinkles pattern uses the ramp_wave wave type by default but may use any wave type. The pattern may be used with color_map, pigment_map, and texture_map.


Section 3.6.8
Pattern Modifiers

Pattern modifiers are statements or parameters which modify how a pattern is evaluated or tells what to do with the pattern. The modifiers color_map and pigment_map apply only to pigments. See "pigment" . The modifiers bump_size, slope_map and normal_map apply only to normals. See "normal" . The texture_map modifier can only be used with textures. See "texture_map" .

The pattern modifiers in the following section can be used with pigment, normal or texture patterns.


Section 3.6.8.1
Transforming Patterns

The most common pattern modifiers are the transformation modifiers translate, rotate, scale, and matrix. For details on these commands see "Transformations" .

These modifiers may be placed inside pigment, normal and texture statements to change the position, size and orientation of the patterns.

In general the order of transformations relative to other pattern modifiers such as turbulence, color_map and other maps is not important. For example scaling before or after turbulence makes no difference. The turbulence is done first, then the scaling regardless of which is specified first. However the order in which transformations are performed relative to warp statements is important. See "warps" for details.


Section 3.6.8.2
Frequency and Phase

The frequency and phase modifiers act as a type of scale and translate modifiers for color_map, pigment_map, normal_map, slope_map and texture_map. This discussion uses color_map as an example but the same principles apply to pigment_map, ormal_map, slope_map and texture_map.

The frequency keyword adjusts the number of times that a color map repeats over one cycle of a pattern. For example gradient x covers color map values 0 to 1 over the range x=0 to x=1. By adding frequency 2.0 the color map repeats twice over that same range. The same effect can be achieved using scale x*0.5 so the frequency keyword isn't that useful for patterns like gradient.

However the radial pattern wraps the color map around the +Y axis once. If you wanted two copies of the map (or 3 or 10 or 100) you'd have to build a bigger map. Adding frequency 2.0 causes the color map to be used twice per revolution. Try this:

pigment { radial color_map{[0.5 color Red][0.5 color White]} frequency 6 }

The result is 6 sets of red and white radial stripes evenly spaced around the object.

The float after frequency can be any value. Values greater than 1.0 causes more than one copy of the map to be used. Values from 0.0 to 1.0 cause a fraction of the map to be used. Negative values reverses the map.

The phase value causes the map entries to be shifted so that the map starts and ends at a different place. In the example above if you render successive frames at phase 0 then phase 0.1, phase 0.2 etc you could create an animation that rotates the stripes. The same effect can be easily achieved by rotating the radial pigment using rotate y*Angle but there are other uses where phase can be handy.

Sometimes you create a great looking gradient or wood color map but you want the grain slightly adjusted in or out. You could re-order the color map entries but that's a pain. A phase adjustment will shift everything but keep the same scale. Try animating a mandel pigment for a color palette rotation effect.

Frequency and phase have no effect on block patterns checker, brick and hexagon nor do they effect image_map, bump_map or material_map. They also have no effect in normal statements when used with bumps, dents, quilted, or wrinkles because these normal patterns cannot use normal_map or slope_map.

They can be used with normal patterns ripples and waves even though these two patterns cannot use normal_map or slope_map either. When used with ripples or waves, frequency adjusts the space between features and phase can be adjusted from 0.0 to 1.0 to cause the ripple or waves to move relative to their center for animating the features.

These values work by applying the following formula:

NEW_VALUE = fmod ( OLD_VALUE * FREQUENCY + PHASE, 1.0 )

Section 3.6.8.3
Waveform

Most patterns that take color_map, pigment_map, slope_map, normal_map or texture_map, use the entries in the map in order from 0.0 to 1.0 however the wood and marble patterns use the map from 0.0 to 1.0 and then reverses it and runs it from 1.0 to 0.0. These differences can easily be seen when using these patterns are used as normal patterns with no maps. Patterns such as gradient or onion generate a grove or slot that looks like a ramp that drops off sharply. This is called a ramp_wave wave type. However wood and marble slope upwards to a peak, then slope down again in a triangle_wave. In previous versions of POV-Ray there was no way to change the wave types. You could simulate a triangle wave on a ramp wave pattern by duplicating the map entries in reverse, however there was no way to use a ramp wave on wood or marble.

Now any pattern that takes a map can have the default wave type overridden. For example:

pigment { wood color_map { MyMap } ramp_wave }

Also available are sine_wave and scallop_wave types. These types are of most use in normal patterns as a type of built-in slope map. The sine_wave takes the zig-zag of a ramp_wave and turns it into a gentle rolling wave with smooth transitions. The scallop_wave uses the absolute value of the sine wave which looks like corduroy when scaled small or like a stack of cylinders when scaled larger.

Although these any of these wave types can be used for pigments, normals or textures, the sine_wave and scallop_wave types are not as noticeable on pigments or textures as they are for normals.

Wave types have no effect on block patterns checker, brick and hexagon nor do they effect image_map, bump_map or material_map. They also have no effect in normal statements when used with bumps, dents, quilted, or wrinkles because these normal patterns cannot use normal_map or slope_map.


Section 3.6.8.4
Turbulence

The keyword turbulence followed by a float or vector may be used to stir up any pigment, normal, texture, irid or halo. A number of optional parameters may be used with turbulence to control how it is computed. For example:

pigment { wood color_map { MyMap } turbulence TURB_VECTOR octaves FLOAT omega FLOAT lambda FLOAT }

Typical turbulence values range from the default 0.0 which is no turbulence to 1.0 or more which is very turbulent. If a vector is specified then different amounts of turbulence are applied in the x, y and z directions. For example

turbulence <1.0, 0.6, 0.1>

has much turbulence in the x direction, a moderate amount in the y direction and a small amount in the z direction.

Turbulence uses a random noise function called DNoise. This is similar to the noise used in the bozo pattern except that instead of giving a single value it gives a direction. You can think of it as the direction that the wind is blowing at that spot. Points close together generate almost the same value but points far apart are randomly different.

In general the order of turbulence parameters relative to other pattern modifiers such as transformations, color_map and other maps is not important. For example scaling before or after turbulence makes no difference. The turbulence is done first, then the scaling regardless of which is specified first. See "warps" for a way to work around this behavior.

Turbulence uses DNoise to push a point around in several steps called octaves. We locate the point we want to evaluate, then push it around a bit using turbulence to get to a different point then look up the color or pattern of the new point.

It says in effect "Don't give me the color at this spot... take a few random steps in different directions and give me that color." Each step is typically half as long as the one before. For example:


Turbulence random walk.

The magnitude of these steps is controlled by the turbulence value. There are three additional parameters which control how turbulence is computed. They are octaves, lambda and omega. Each is optional. Each is followed by a single float value. Each has no effect when there is no turbulence.


Section 3.6.8.5
Octaves

The octaves value controls the number of steps of turbulence that are computed. Legal values range from 1 to 10. The default value of 6 is a fairly high value; you won't see much change by setting it to a higher value because the extra steps are too small. Float values are truncated to integer. Using smaller number of octaves gives a gentler, wavy turbulence and computes faster. Higher octaves create more jagged or fuzzy turbulence and takes longer to compute.

Section 3.6.8.6
Lambda

The lambda parameter controls how statistically different the random move of an octave is compared to its previous octave. The default value is 2.0 which is quite random. Values close to lambda 1.0 will straighten out the randomness of the path in the diagram above. The zig-zag steps in the calculation are in nearly the same direction. Higher values can look more "swirly" under some circumstances.
Next Section
Table Of Contents